package com.yisu.auction.api.domain.vo.goodsInfoPackageVos;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * author: 赵杰
 * Business Description：往期记录实体
 * createTime：2017/8/17
 */
public class PreviousRecordVo {
    private String ico; //用户头像
    private String userName;//用户名
    private BigDecimal transactionPrice; //成交价
    private String savePercentage; //节省百分比
    private long prizeId;
    private String announceTime; //揭晓时间
    private BigDecimal price; //市场价




    public String getIco() {
        return ico;
    }

    public void setIco(String ico) {
        this.ico = ico;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public BigDecimal getTransactionPrice() {
        if(transactionPrice==null)
            return BigDecimal.valueOf(0);
        return transactionPrice;
    }

    public void setTransactionPrice(BigDecimal transactionPrice) {
        this.transactionPrice = transactionPrice;
    }

    public String getSavePercentage() {
        return savePercentage;
    }

    public void setSavePercentage(String savePercentage) {
        this.savePercentage = savePercentage;
    }

    public long getPrizeId() {
        return prizeId;
    }

    public void setPrizeId(long prizeId) {
        this.prizeId = prizeId;
    }

    public String getAnnounceTime() {
        return announceTime;
    }

    public void setAnnounceTime(Date announceTime) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        this.announceTime = simpleDateFormat.format(announceTime);
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "PreviousRecordVo{" +
                "ico='" + ico + '\'' +
                ", userName='" + userName + '\'' +
                ", transactionPrice=" + transactionPrice +
                ", savePercentage='" + savePercentage + '\'' +
                ", prizeId=" + prizeId +
                ", announceTime='" + announceTime + '\'' +
                ", price=" + price +
                '}';
    }
}
